package io.renren.modules.zjyx6.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.zjyx6.dao.B96B97WatersavingDistrictRateDao;
import io.renren.modules.zjyx6.entity.B96B97WatersavingDistrictRateEntity;
import io.renren.modules.zjyx6.service.B96B97WatersavingDistrictRateService;


@Service("b96B97WatersavingDistrictRateService")
public class B96B97WatersavingDistrictRateServiceImpl extends ServiceImpl<B96B97WatersavingDistrictRateDao, B96B97WatersavingDistrictRateEntity> implements B96B97WatersavingDistrictRateService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        String createby=params.get("createby").toString();
        IPage<B96B97WatersavingDistrictRateEntity> page = this.page(
                new Query<B96B97WatersavingDistrictRateEntity>().getPage(params),
                new QueryWrapper<B96B97WatersavingDistrictRateEntity>().eq("creatby",createby)
        );

        return new PageUtils(page);
    }
    public PageUtils queryPageforDistrict(Map<String, Object> params) {
        String typecode=params.get("typecode").toString();
        System.out.println("typecode is "+typecode+"**********");
        IPage<B96B97WatersavingDistrictRateEntity> page = this.page(
                new Query<B96B97WatersavingDistrictRateEntity>().getPage(params),
                new QueryWrapper<B96B97WatersavingDistrictRateEntity>().like("type_code", typecode)
        );
        return new PageUtils(page);
    }
}
